﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
//using System.Xml.Linq;
using System.Collections.Generic;

using YouHP.Model;
using YouHP.BLL;
using YouHP.Utility;

namespace web.admin
{
    public partial class diseaseSymptoms : System.Web.UI.Page
    {
        private DiseaseBLL diseaseBll = DiseaseBLL.Instance;
        
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Bind();
            }
        }

        protected void Bind()
        {
            try
            {
                int id = RequestTools.GetQueryInt("id", -1);
                if (id > 0)
                {
                    DiseaseSymptoms diseaseSymptoms = diseaseBll.GetDiseaseSymptoms(id);
                    if (diseaseSymptoms.DiseasePrimarySymptoms.Length <= 0) diseaseSymptoms.DiseasePrimarySymptoms = "暂未设置";
                    if (diseaseSymptoms.DiseaseSecondSymptoms.Length <= 0) diseaseSymptoms.DiseaseSecondSymptoms = "暂未设置";

                    IList list = new ArrayList();
                    list.Add(diseaseSymptoms);

                    this.diseaseSymptomsInfo.DataSource = list;
                    this.diseaseSymptomsInfo.DataBind();
                }
                else { }
            }
            catch(Exception ex)
            {
                throw ex;
            }
        }
    }
}
